import request from "@/utils/request";
import cfg from "@/config/config";

const overTime = {

    //添加加班
    addOverTimeOrder: param => {
        return request("post", cfg.apiUrl + "api/overTime/addOverTimeOrder", param);
    },
    //根据单号获取详单人员信息
    getDetailOfOrder: param => {
        return request("post", cfg.apiUrl + "api/overTime/getDetailOfOrder", param);
    },
    //根据单号删除
    deleteOverTimeOrder: param => {
        return request("post", cfg.apiUrl + "api/overTime/deleteOverTimeOrder", param);
    },
    //删除加班明细
    deleteOverTimeOrderDetail: param => {
        return request("post", cfg.apiUrl + "api/overTime/deleteOverTimeOrderDetail", param);
    },
    
    /**
     * 个人加班页面主表格
     * @param param orderId
     */
    findTimecardJb: param => {
        return request("post", cfg.apiUrl + "api/timeCard/findTimecardJb", param);
    },
    //加班审批
    doApproval: param => {
        return request(
            "post",
            cfg.apiUrl + "api/overTime/doApproval",
            param
        );
    },
    //验证要取消的假单是否包含封账范围
    getOrderNoByFz: param => {
        return request(
            "get",
            cfg.apiUrl + "api/overTime/getOrderNoByFz",
            param
        );
    },
};

export default overTime;
